<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@font-face自定义字体</title>
    <style>
        @font-face {
            font-family: myFont-name;
            /* css/fonts/书法.ttf */
            src: url(box/file/css/fonts/书法.ttf);
        }
        
        .defined {
            font-family: myFont-name;
            font-style: 4em;
            color: red;
        }
    </style>
</head>

<body>
    <p class="defined">使用@font-face，应用漂亮的web字体</p>
    <p>使用@font-face，应用漂亮的web字体</p>

</body>

</html>